/**
 * Created by Administrator on 2017/7/25.
 */
define(['ngApp'],function (ngApp){
ngApp.factory('commonFn',function () {
    return{
        isLogin:false,
        "escape2Html": function (str) {
            var arrEntities = {'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"'};
            return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
                return arrEntities[t];
            });
        }
    }
})
});
